The present invention relates to processing digital images.
A digital image includes digital data describing local graphical attributes of the image, such as color or gray level of pixels in the image. Digital images can be generated by input devices, such as scanners or digital cameras. Digital images can also be generated or processed by software applications executed in a computer system. The digital image can be visually presented to users by output devices. The output device can be a display device using a cathode ray tube (“CRT”), a liquid crystal display (“LCD”) or a video projector. Or the display device can be a printing device, such as a laser printer or an ink jet printer.
Typically, each input or output device represents graphical attributes of the image in a device specific electronic representation. For example, CRT and LCD display devices display each pixel of the image using three display elements that display red, green, and blue colors separately. The corresponding device specific color representation includes a red, a green and a blue (“RGB”) color component for each image pixel. Printers can display each pixel of the image using cyan, magenta, yellow, and black inks that represent the color components in a cyan-magenta-yellow-black (“CMYK”) color space.
Input and output devices are typically characterized by device specific opto-electronic transfer functions. An opto-electronic transfer function is a function that describes the relationship between the electronic representation of a color and the corresponding optical (or perceptual) intensities of the color as they are produced by the device. The transfer function is typically defined for the device specific representation of colors, and is applied separately to each component of the device specific color space. For a scanner, the opto-electronic transfer function describes how colors in an original image relate to scanned color values. For a CRT monitor, the opto-electronic transfer function describes how displayed red, green and blue color intensities depend on the color values in the electronic representation of the color. Typically, the optoelectronic function is a piece-wise continuous function that includes a substantially linear portion at small intensities and a shifted power law portion at larger intensities.
A digital image is often transmitted from one device to another. For example, an image generated by a digital camera can be transmitted to a computer display or a printer. Or digital images can be transmitted between computers connected to a computer network such as the Internet. When displayed or printed on different devices, the same digital image may look different due to differences in the specific color spaces or transfer functions of the different devices. To avoid such variations, the image is associated with an image profile, such as an International Color Consortium (“ICC”) profile. The image profile identifies one or more input transfer functions that map a device specific representation of the image into a device independent representation. The device independent representation can specify the colors of the image in a device independent color space, such as the profile connection space (“PCS”) defined by the ICC or the L*a*b* color space defined by the Commission Internationale de l'Éclairage (“CIE”).
An image profile typically specifies a transfer function for the colors of an image as a look-up table. The look-up table associates a finite set of input color values with corresponding transfer function values. For input values outside the finite set, transfer function values can be obtained by interpolating between two or more values stored in the look-up table. Alternatively, transfer function values can be obtained from a function that is fit to the finite set of values stored in the look-up table. The fitted function is typically a simple power law function that is fit to the look-up table values using standard techniques, such as the method of Levenberg and Marquardt for fitting non-linear data.
One of the most important transfer functions stored in an image profile is the transfer function for gamma corrections. This transfer function is used to compensate for the non-linear voltage response curve of output display devices. To faithfully display or print an image on a particular output device, the color values of the image are precompensated for the non-linear distortions that will be caused by the output transfer function of the device. That is, the color values of the image are adjusted such that when the image is displayed on the output device, the transfer function of the output device will distort the adjusted color values such that the “true” colors in the image will be reproduced.